import { ApiPropertyOptional } from "@nestjs/swagger";
import { PageDto } from "src/common/dto/dto";
import { FindOperator } from "typeorm";
import { OperationRecordType, MethodType, OperateType } from "../entities/operation-record.entity";
export class GetOperationRecordPageDto extends PageDto {
    @ApiPropertyOptional({
        type: String,
        name: 'name',
        description: '操作名称',
    })
    public readonly name?: FindOperator<string>;
    /** 操作类型 */
    @ApiPropertyOptional({
        name: 'operateType',
        description: '操作类型',
        enum: OperateType,
    })
    public readonly operateType: OperateType;

    /** 请求方式 */
    @ApiPropertyOptional({
        name: 'method',
        description: '请求方式',
        enum: MethodType,
    })
    public readonly method: MethodType;
    /** 用户ID */
    @ApiPropertyOptional({
        type: String,
        name: 'userId',
        description: '用户ID',
    })
    public readonly userId?: number;
    /** IP */
    @ApiPropertyOptional({
        type: String,
        name: 'ip',
        description: 'ip',
    })
    public readonly ip?: string;
    /** 接口路径 */
    @ApiPropertyOptional({
        type: String,
        name: 'interfacePath',
        description: '接口路径',
    })
    public readonly interfacePath?: string;
}
export class CreateOperationRecordDto {
    public readonly name: string;
    public readonly method: MethodType;
    public readonly ip: string;
    public readonly operation: string;
    public readonly outside: OperationRecordType;
    public readonly operateType: OperateType;
    public readonly interfacePath: string;
    public readonly dataId?: number;
}